package cn.redsoft.wechatapi.msg.req.event;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("xml")
public class LocationEventRequestMsg extends EventRequestMsg {

	@XStreamAlias("Latitude")
	private double latitude;// 纬度

	@XStreamAlias("Longitude")
	private double longitude;// 经度

	@XStreamAlias("Precision")
	private double precision;// 精度

	public LocationEventRequestMsg() {
		this.event = Event.LOCATION;
	}

	public LocationEventRequestMsg(String toUserName, String fromUserName,
			Long createTime, long msgId, double latitude, double longitude,
			double precision) {
		super(toUserName, fromUserName, createTime, msgId);
		this.latitude = latitude;
		this.longitude = longitude;
		this.precision = precision;
		this.event = Event.LOCATION;
	}

	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public double getPrecision() {
		return precision;
	}

	public void setPrecision(double precision) {
		this.precision = precision;
	}

	@Override
	public String toString() {
		return "LocationEventRequestMsg [latitude=" + latitude + ", longitude="
				+ longitude + ", precision=" + precision + ", event=" + event
				+ ", toUserName=" + toUserName + ", fromUserName="
				+ fromUserName + ", createTime=" + createTime + ", msgType="
				+ msgType + ", msgId=" + msgId + "]";
	}

}
